import request from '@/utils/request'

/**
 * 批量手动新增，保存历史销售数据
 * @param {object} data
 * @returns
 */
export function saveSaleData(data, type) {
  return request({
    url: type === 1 ? '/api/v1/displayHistoryData/createBatch' : '/api/v1/displayHistoryData/updateBatch',
    method: 'post',
    data
  })
}

/**
 * 批量删除
 * @param {Array} data
 * @returns
 */
export function deleteBatch(data) {
  return request({
    url: `/api/v1/displayHistoryData/deleteBatch`,
    method: 'delete',
    data
  })
}

/**
 * 根据当前登录用户获取租户下门店列表
 * @returns
 */
export function getShopList() {
  return request({
    url: `/api/v1/displayHistoryData/getShopList`,
    method: 'get'
  })
}
